STEP 1: Notice that we gave you multiple functions. We'll call them as we create our program. Let's get started!

  • In LOGIC and , drag Define Function with Docstring above MAIN FUNCTION.
  • Then, drag in Main Function underneath where it says: MAIN FUNCTION.
  • Finally, drag Function Call into Variable into main() and change my_var to user_input.
  • This function will protect the program if the user causes an error. Click Run when finished.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)